<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

    <input id="num1" type="text" placeholder="请输入一个数字">
    <select name="" id="sel">
        <option>+</option>
        <option>-</option>
        <option>*</option>
        <option>/</option>
    </select>
    <input id="num2" type="text" placeholder="请输入第二个数字">
    <input id="btn" type="button" value="=">
    <input id="res" type="text">



    <script>


        // select 获取值的时候
        //   option 标签不写value属性       那么获取的就是 option标签里面的值
        //   option 标签加了value属性       那么获取的就是value值  


        var oSel = document.getElementById('sel');

        var oBtn = document.getElementById('btn');


        oBtn.onclick = function () {
            var symbol = oSel.value;

            console.log(symbol);
        }



    </script>


</body>

</html>